{% extends "topnav.html"%}

{% block title %}
教工查询
{% endblock %}

<body>
{% block body %}
<div class="container-fluid ">
    <div class="col-sm-2">
        <div class="menus">
            <div class="item">
                <div class="header" onclick="clickMe(this);">业务处理</div>
                <div class="content hide">
                    <a href="{{url_for('sm.insert')}}">--业务录入</a>
                    <a href="{{url_for('sm.process')}}">--业务审批</a>
                    <a href="{{url_for('sm.search')}}">--业务查询</a>
                    <a>--使用说明</a>
                </div>
            </div>
            <div class="item">
                <div class="header" onclick="clickMe(this);">信息与沟通</div>
                <div class="content hide">
                    <a>--查询分析</a>
                    <a>--公告通知</a>
                    <a>--系统说明</a>
                    <a>--数据导出</a>
                </div>
            </div>
        </div>
    </div>
    <div class="col-sm-10">
        <div class="panel panel-info">
            <div class="panel-heading">
                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                教工查询情况：
            </div>
            <div>
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>工号</th>
                        <th>姓名</th>
                        <th>部门</th>
                        <th>已特殊说明次数</th>
                        <th>联系方式</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>{{this_teacher.teacher_id}}</td>
                        <td>{{this_teacher.name}}</td>
                        <td>{{this_teacher.department}}</td>
                        <td>{{this_teacher.number_of_times}}</td>
                        <td>{{this_teacher.phonenumber}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <script src="../static/js/jquery-3.7.0.min.js"></script>
    <script src="../static/plugins/bootstrap-3.4.1/js/bootstrap.min.js"></script>

    <script type="text/javascript">
        function clickMe(self) {
            var hasHide = $(self).next().hasClass("hide");
            if (hasHide) {
                $(self).next().removeClass("hide");
            } else {
                $(self).next().addClass("hide");
            }
        }
    </script>

    <script>
        var currentTime = new Date();
        var year = currentTime.getFullYear();
        var month = (currentTime.getMonth() + 1).toString().padStart(2, '0');
        var date = currentTime.getDate().toString().padStart(2, '0');
        var hour = currentTime.getHours().toString().padStart(2, '0');
        var minute = currentTime.getMinutes().toString().padStart(2, '0');

        var defaultValue = year + '-' + month + '-' + date + 'T' + hour + ':' + minute;
        document.getElementById("input_time").value = defaultValue;
    </script>

    {% endblock %}
</body>